<template>
  <div class="action-buttons">
    <el-button
      v-for="(action, index) in params.actions"
      :key="`${action.label}_${index}`"
      :type="action.type"
      @click="action.click(params.data)"
      size="small"
    >
      {{ action.label }}
    </el-button>
  </div>
</template>

<script>
export default {
  name: "ActionButtons",
  props: {
    params: {
      type: Object,
      required: true,
      default: () => ({
        data: null,
        actions: [],
      }),
    },
  },
};
</script>

<style lang="scss">
.action-buttons {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
}
</style>
